
package br.com.sigmah.controller.businessObjects;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import org.hsqldb.lib.HashSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import br.com.sigmah.controller.facade.LoginFacade;
import br.com.sigmah.domain.entity.HorarioIndisponivelProfessor;
import br.com.sigmah.domain.entity.Professor;
import br.com.sigmah.domain.entity.RestricaoProfessor;
import br.com.sigmah.domain.entity.Usuario;
import br.com.sigmah.domain.repository.HorarioIndisponivelProfessorDataManager;
import br.com.sigmah.domain.repository.LoginDataManager;
import br.com.sigmah.domain.repository.ProfessorDataManager;

@Service("loginFacade")
public class LoginBO implements LoginFacade, Serializable{

	@Autowired
	private LoginDataManager loginDataManager;
	
	@Autowired
	private ProfessorDataManager professorDataManager;

	@Autowired
	private HorarioIndisponivelProfessorDataManager  horarioIndisponivelProfessorDataManager;
	
	
	@Override
	public void verificarUsuario(Usuario usuario) {
//		Professor professor  = new Professor();
//		
//		professor.setMatricula(123);
//		professor.setNome("Saulo");
//		professor.setCarga(1);
//		professor = professorDataManager.save(professor);

//		RestricaoProfessor res = new RestricaoProfessor();
//		
//		professor.setRestricaoProfessor(res);
//		professor = professorDataManager.save(professor);
//
//		HorarioIndisponivelProfessor hrIndPro = new HorarioIndisponivelProfessor();
//		
//		hrIndPro.setIndisponibilidade(true);
//		hrIndPro = horarioIndisponivelProfessorDataManager.save(hrIndPro);
//		
//		List<HorarioIndisponivelProfessor> hr = new ArrayList<HorarioIndisponivelProfessor>();
//		 
//		hr.add(hrIndPro);
//		 
//		//professor.setHorariosIndisponiveisProfessor(hr);
//		professor = professorDataManager.save(professor);
//
//		loginDataManager.save(usuario);
	}

	public LoginDataManager getLoginDataManager() {
		return loginDataManager;
	}

	public void setLoginDataManager(LoginDataManager loginDataManager) {
		this.loginDataManager = loginDataManager;
	}
	
	

}
